<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/commonList.jsp"%>

<html>
<head>
<script language="JavaScript"  src="${ctx}/scripts/common/prototype.js"></script>
<script type="text/javascript" src="${ctx}/scripts/div/common.js"></script>


<script type="text/javascript" src="${ctx}/scripts/common/prototype.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/common.js"></script>
<script language="JavaScript"  src="${ctx}/scripts/ajaxException.js"></script>
<%@ include file="/commons/tabs.jsp" %>



<script type="text/javascript">
	//参与类型
	var participantTypeCode="";
	//客户类型
	var customerTypeCode="";
	//个人信息ID
	var participantID="";
	//客户ID
	var clientID="";

 	function resize(){

		if('${isHouseMainLine}'=='1') {
			$('houseNumber').value = findFrame('HouseMainLine').$F('houseNumber');
		}
		else{
			parent.window.document.all('customerList').style.height=document.body.scrollHeight;
			$('houseNumber').value=parent.$F('houseNumber');
		}
	}

	function changeID(ctc,ptc,iid,cid){
		participantTypeCode=ptc;
		customerTypeCode=ctc;
		participantID=iid;
		clientID=cid;
	}

	function freshFrame(){
		document.forms.ec.ec_p.value=document.getElementById("ec_p").value;
		document.forms.ec.submit();
	}

	function openDetail(houseNumber){
		if('${isHouseMainLine}'==='1'){

			parent.houseDetail(houseNumber);
			return;
		}
		else{
			parent.openDetail();
		}
	}
	function showRightMenu(evn){
		if('${isHouseMainLine}'==='1')return ;
		return ShowContextMenu(evn,'quick_rightmenu');
	}
</script>

</head>
<body onload="resize()">
<div    class="tab_bgline" >
<div style="overflow:auto; height:360px;">
<ec:ceTable items="customerList"
	action="${ctx}/customer_customerAction.do?method=search"
	var="customerItem"
	view="pmsview"
	styleClass="gridData2"
	rowsDisplayed="15" >
	<ec:ceRow styleClass="grid" onclick="changeID('${customerItem.customerTypeCode}','${customerItem.participantTypeCode}','${customerItem.individualID}','${customerItem.clientID}');"
	ondblclick="openDetail('${customerItem.houseNumber}');" onContextMenu="showRightMenu(event)">
		<ec:ceColumn headerCell="pmsHeadrCell" title="姓名" property="customerName" sortable="true" width="9%" styleClass="align_left"/>
		<ec:ceColumn headerCell="pmsHeadrCell" title="房号" property="houseNumber" sortable="true" width="9%" styleClass="align_left"/>
		<ec:ceColumn headerCell="pmsHeadrCell" title="住户类型" property="customerType" width="8%" styleClass="align_left"/>
		<ec:ceColumn headerCell="pmsHeadrCell" title="证件类型" property="idType" width="9%" styleClass="align_left"/>
		<ec:ceColumn headerCell="pmsHeadrCell" title="证件号码" property="idNO" width="8%" styleClass="align_left"/>
		<ec:ceColumn headerCell="pmsHeadrCell" title="联系电话" property="telephone" width="9%" styleClass="align_left"/>
	</ec:ceRow>
	<ec:parameter name="houseNumber"></ec:parameter>
	<ec:parameter name="customerName"></ec:parameter>
	<ec:parameter name="telephone"></ec:parameter>
	<ec:parameter name="isHouseMainLine" value="${isHouseMainLine }"></ec:parameter>
</ec:ceTable>
</div>
</div>
<!--------------menu01------------------------->
<div id="quick_rightmenu" style="display:none;" oncontextmenu="return false" class="quick_rightmenu">
<table width="100%" border="0" cellpadding="1" cellspacing="0" class="grid_quickMenu_bg">

	<tr>
      <td><table width="100%" border="0" cellpadding="2" cellspacing="0">
      <pms:AuthTag authName="menu.nopage.addCustomer">
       <tr>
		  <td class="quickMenu_toolbarico"><a href="#" onMouseOver="show2menu('quick_rightmenu2',this,event,'quick_rightmenu')" onMouseOut="hidden2menu('quick_rightmenu2')"><img src="${ctx}/images/ico_newfile.gif" border="0" align="absbottom" alt="新增"/> 新 增&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="${ctx}/images/ico_index_start1.gif" border="0" /></a></td>
          </tr>
          </pms:AuthTag>
          <pms:AuthTag authName="customer_customerAction.do?method=editCustomer">
          <tr>
          <td class="quickMenu_toolbarico"><a href="#"  onclick="parent.openCustomerEdit();" onfocus="this.blur()"><img src="${ctx}/images/ico_amend.gif" border="0" align="absbottom" alt="修改"/> 修 改</a></td>
          </tr>
          </pms:AuthTag>
          <pms:AuthTag authName="customer_customerAction.do?method=deleteCustomer">
		  <tr>
          <td class="quickMenu_toolbarico"><a href="#"  onclick="parent.deleteCustomer();" onfocus="this.blur()"><img src="${ctx}/images/ico_delete.gif" border="0" align="absbottom" alt="修改"/> 删 除</a></td>
          </tr>
          </pms:AuthTag>
          <pms:AuthTag authName="customer_memberAction.do?method=showMemberInfoList">
     	  <tr>
		   <td class="hrpading"><table width="95%" border="0" align="left" cellpadding="0" cellspacing="0">
		     <tr><td class="quickMenu_line"></td></tr></table></td>
          </tr>
         <tr>
          <td class="quickMenu_toolbarico"><a href="#"  onClick="parent.openMembo();" onFocus="this.blur()"><img src="${ctx}/images/ico_addmen.gif" border="0" align="absbottom" alt="家庭成员维护"/>&nbsp;家庭成员维护</a></td>
          </tr>
          </pms:AuthTag>
      </table></td>
    </tr>
  </table>
</div>
<!--------------------右边图标 新增更多菜单 开始---------------------->
<div id="quick_menumore" class="quick_menu2" >
  <table width="100%" border="0" cellpadding="1" cellspacing="0" class="grid_quickMenu_bg" onMouseOver="showmy2menu('quick_menumore')" onMouseOut="hidden2menu('quick_menumore')">
       <tr>
      <td>
	  <table width="100%" border="0" cellpadding="1" cellspacing="0">

	    <tr>
         <td class="quickMenu_toolbarico"><a href="#" onClick="" onFocus="this.blur()"><img src="${ctx}/images/ico_newfile.gif" alt="新增业主资料" border="0" align="absbottom"/>&nbsp;新增业主资料</a></td>
          </tr>


        <tr>
         <td class="quickMenu_toolbarico"><a href="#" onFocus="this.blur()" onClick=""><img src="${ctx}/images/ico_newfile.gif" alt="新增租户资料" border="0" align="absbottom"/>&nbsp;新增租户资料</a></td>
          </tr>

      </table></td>
    </tr>
  </table>
</div>




<div id="quick_rightmenu2" class="quick_menu2" style="display:none;">
  <table width="100%" border="0" cellpadding="1" cellspacing="0" class="grid_quickMenu_bg" onMouseOver="showmy2menu('quick_rightmenu2')" onMouseOut="hidden2menu('quick_rightmenu2')">
       <tr>
      <td>
	  <table width="100%" border="0" cellpadding="2" cellspacing="0">
	   <pms:AuthTag authName="customer_ownerAction.do?method=initOwnerAddMain">
	    <tr>
         <td class="quickMenu_toolbarico"><a href="#" onClick="parent.openOwnerAdd();" onFocus="this.blur()"><img src="${ctx}/images/ico_newfile.gif" alt="新增业主资料" border="0" align="absbottom"/>&nbsp;新增业主资料</a></td>
          </tr>
         </pms:AuthTag>
         <pms:AuthTag authName="customer_lesseeAction.do?method=initLesseeAddMain">
        <tr>
         <td class="quickMenu_toolbarico"><a href="#" onFocus="this.blur()" onClick="parent.openAddLessee();"><img src="${ctx}/images/ico_newfile.gif" alt="新增租户资料" border="0" align="absbottom"/>&nbsp;新增租户资料</a></td>
          </tr>
 </pms:AuthTag>
      </table></td>
    </tr>
  </table>
</div>

</body>
</html>